x86/shim: suspend and resume platform time correctly
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 4 Feb 2020 21:49:36 +0000 (21:49 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Feb 2020 18:01:52 +0000 (18:01 +0000)
commita7a3ecd82e289a9a2ecc1d3b5128580e0b577cc7
treef4fb736d3101b77c2e0811f6f8cb122c41d4cd65
parente2d1254f5af2a6ff24d009523639b80ccba2c089
x86/shim: suspend and resume platform time correctly

Similarly to S3, platform time needs to be saved on guest suspend
and restored on resume respectively. This should account for expected
jumps in PV clock counter value after resume. time_suspend/resume()
are safe to use in PVH setting as is since any existing operations
with PIT/HPET that they do would simply be ignored if PIT/HPET is
not present.

Additionally, add resume callback for Xen PV clocksource to avoid
its breakage on migration.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/pv/shim.c
xen/arch/x86/time.c